package com.ty.day1;

/**
 * Created by IntelliJ IDEA.
 *
 * @author : txy
 * @create : 2023/11/14 10:47
 */
public class Dog {
    String name;
    Integer age;
    String color;
    String sex;

    public void eat(String food) {
        System.out.println("我叫" + name + ",我吃:" + food);
    }

    public void sing() {
        System.out.println(name + "在唱歌：wangwangwangwangwang");
    }

    @Override
    public String toString() {
        return "Dog{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", color='" + color + '\'' +
                ", sex='" + sex + '\'' +
                '}';
    }
}
